/* factorial.c */

int factorial(int n) {
    int result = 1;
    if (n == 0)
        return result;
    result = factorial(n-1) * n;
    return result;    
}
